package com.atguigu.tingshu.common.service;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RabbitService {

    @Autowired
    private RabbitTemplate rabbitTemplate ;

    public void sendMsg(String exchangeName , String routingKey , String payload) {
        rabbitTemplate.convertAndSend(exchangeName , routingKey , payload);
    }

}
